#pragma once
#include <stdio.h>

#define MAX 1024
#define NONE_FLUSH (1<<0)
#define LINE_FLUSH (1<<1)
#define FULL_FLUSH (1<<2)

typedef struct IO_FILE
{
    int fileno;
    int flag;
    char outbuffer[MAX];
    int bufferlen;
    int flush_method;
}MyFile;


MyFile *MyFopen(const char *path, const char *mode);
void MyFclose(MyFile *);
int MyFwrite(MyFile *, const void *str, int len);
void MyFFlush(MyFile *);

    //std::cout << "hello cout"<< std::endl; 
    //printf("hello prinf\n");

    ////向标准错误进行打印，stderr, cerr->2, 显示器
    //std::cerr << "hello cerr" <<std::endl;
    //fprintf(stderr, "hello stderr\n");
